<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />  
    <title>事件类型</title>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta name="author" content="飞啊飘啊">
	<meta name="hashcode" content="-1839533335">
	
	<script>window.duteTag="lz";</script>
	<script type="text/javascript" src="/admin/js/dute-1.0.js"></script>
	<script type="text/javascript" src="/admin/js/jquery-1.7.1.min.js"></script>
	
	<script type="text/javascript" src="/admin/js/lazy3q.ui.js"></script>
	<script>
		document.write('<link rel="stylesheet" type="text/css" href="/admin//css/'+($.cookie('theme')||'elegant')+'/lazy3q.ui.css" /> ');
	</script>
	
	<script type="text/javascript" src="/admin/js/jquery-ui-1.10.2.custom.min.js"></script>
	
	<!-- 用户自定义js(懒加载) -->
	<script type="text/javascript" src="/admin/js/define.js"></script>
	<!-- 用户自定义css样式 -->
	<link rel="stylesheet" type="text/css" href="/admin/css/define.css"/>
	<!-- icon font -->
  	<link rel="stylesheet" href="/admin/css/iconfont.css">
	
	
	
	<script type="text/javascript">
		window.basePath="/";
		window.hashcode = "-1839533335";
	</script>
		
	<!-- 感谢kindeditor出品的在线HTML编辑控件 -->
	<script type="text/javascript" charset="utf-8" src="/admin/js/kindeditor/kindeditor.js"></script>
		
	<!-- 感谢My97DatePicker出品的时间控件 -->
	<script language="javascript" type="text/javascript" src="/admin/js/My97DatePicker/WdatePicker.js"></script>
	
	<!------------------------VIEW_HTML_HEAD------------------------>
	<!------------------------VIEW_HTML_HEAD------------------------>	
	
</head>
<script>
Page({
  data:{
    
  },
  onLoad: function(options) {
  	var THIS = this;
  	THIS.setData(options);
  	$.getAjax("eventtype.get.do",options,function(protocol){
  		if(protocol.message){
  			$.toast(protocol.message);
  		}
  		document.title={
  			 "insert":"创建事件类型"
  			,"inport":"导入事件类型"
  			,"update":"修改事件类型"
  			,"detail":"事件类型详情"
  		}[options.edittype];
  		THIS.setData(protocol.data); 
  		/******************VIEW_HTML_SET_DATA******************/
  		/******************VIEW_HTML_SET_DATA******************/
  	});
  }
});
</script>
<script>
window["lzFlashUrl"]=top.lzFlashUrl||"/admin/flash/";
window["uploadUrl"]=top.uploadUrl||"/admin/upload.do";

$(function(){
		 
	$("#eventtypeForm").form({
		"":function(){}
		,"srvEventType.setId":function(el){
			if($(el).parents("dd:eq(0)").find("b:contains('*')").size()>0){
			}
		}
		,"srvEventType.setName":function(el){
			if($(el).parents("dd:eq(0)").find("b:contains('*')").size()>0){
				if(jQuery.trim(el.value)=="")
					return "类型名称不能为空";
			}
			if(el.value.length>32 && el.value.indexOf("[*]")==-1)
				return "类型名称最大长度为32个字符";
		}
		,"srvEventType.setLevel":function(el){
			if($(el).parents("dd:eq(0)").find("b:contains('*')").size()>0){
				if(jQuery.trim(el.value)=="")
					return "请选择事件级别";
			}
		}
		,"srvEventType.setInterval":function(el){
		}
		,"srvEventType.setUpdateTime":function(el){
			if($(el).parents("dd:eq(0)").find("b:contains('*')").size()>0){
				if(jQuery.trim(el.value)=="")
					return "修改时间不能为空";
			}
		}
		,"srvEventType.setAddTime":function(el){
			if($(el).parents("dd:eq(0)").find("b:contains('*')").size()>0){
				if(jQuery.trim(el.value)=="")
					return "添加时间不能为空";
			}
		}
		,"srvEventType.setStatus":function(el){
			if($(el).parents("dd:eq(0)").find("b:contains('*')").size()>0){
				if(jQuery.trim(el.value)=="")
					return "请选择状态";
			}
		}
	},function(){
		/******************************LAZY3Q_FORM_VALIDATE******************************/
		/******************************LAZY3Q_FORM_VALIDATE******************************/
	});		
});
</script>

<body style="display:none;">



<!------------------------VIEW_HTML_TOP------------------------>
<!------------------------VIEW_HTML_TOP------------------------>


<form enctype="{{inports!=null?'multipart/form-data':''}}" lz:if="{{edittype=='insert'||edittype=='update'||edittype=='detail'||edittype=='any'||edittype=='inport'}}" class="form editform edittype_{{edittype}}" ref="SrvEventType" id="eventtypeForm" name="eventtypeForm" target="jsoniframe" action="eventtype.{{edittype=='any'?'update':edittype}}.do" method="post">
	<div class="head"></div>
	<div class="body">
		<div class="content">
			<div lz:if="{{edittype!='detail'}}" class="prompt">
				温馨提示：请仔细填写事件类型相关信息，<span class="extrude">"*" 为必填选项。</span>
			</div>
			<br/>
			<lz:block lz:if="{{message}}">
			<br/>
			<center>
				<font color="red"><h4>{{message}}</h4></font>
			</center>
			<br/>
			</lz:block>
			<input type="hidden" value="{{complete}}" name="complete" id="complete" />
			<input type="hidden" value="{{ids}}" name="ids" id="ids" />
			<textarea name="PARAMS" id="PARAMS" style="display:none">{{PARAMS}}</textarea>
			
			
			<lz:block lz:if="{{inports}}">
			  <div class="line"></div>
			  <dl style="width:98%;">
			  	<dt>Excel文件:</dt>
			  	<dd>
			  		<input type="hidden" value="{{inports}}" name="inports" id="inports" />
			  		<input type="hidden" value="{{inport$}}" name="inport$" id="inport$" />
			  		<input name="file" name="file" type="file"/>
			  		<b>*</b>
			  		<div>
						请上传excel文件，表格列依次为：[{{inport$}}]，excel表格第一行为列名称，将不作为上传数据行
					</div>
			  	</dd>
			  </dl>
			  <div class="line"></div>
			</lz:block>
	{{lz.set("setId_editable",((edittype=='insert'||(edittype=='inport' && (!lz.idin(inports,"setId"))))&&true)||(edittype=='update'&&true)||((edittype=='any')&&(lz.idin(fields,"setId"))))}}
	{{lz.set("setId_readonly",(edittype=='insert'&&false)||(edittype=='update'&&false)||(edittype=='detail'))}}
	
	{{before$setId}}
	<dl lz:if="{{setId_editable||setId_readonly}}" class="setId hidden " major  ref="setId">
		<dt>编　　号:</dt>
		<dd lz:if="{{setId_editable}}" input="hidden">
			<lz:block lz:if="{{srvEventType$setId}}">
				{{srvEventType$setId}}
			</lz:block>
			<lz:block lz:if="{{!srvEventType$setId}}">
			<input type="hidden" value="{{lz.htm(srvEventType.setId)}}" name="srvEventType.setId" id="setId" />
	 	 </lz:block>
	 	 
	 	 <em></em> 
	 	 <a class="mui-navigate-right"></a>
		</dd>
		<dd lz:if="{{setId_readonly}}">
		 	<div class="state-input narrow">
		 		<textarea class=""  style="display:none;" id="setId">{{srvEventType.setId}}</textarea>
		 		<span>
		 	
			 {{lz.html(srvEventType.setId$||srvEventType.setId)}}
	 	 		</span>
	 	 	</div>
		</dd>
	</dl>
	{{after$setId}}
	{{lz.set("setName_editable",((edittype=='insert'||(edittype=='inport' && (!lz.idin(inports,"setName"))))&&true)||(edittype=='update'&&true)||((edittype=='any')&&(lz.idin(fields,"setName"))))}}
	{{lz.set("setName_readonly",(edittype=='insert'&&false)||(edittype=='update'&&false)||(edittype=='detail'))}}
	
	{{before$setName}}
	<dl lz:if="{{setName_editable||setName_readonly}}" class="setName  " major  ref="setName">
		<dt>类型名称:</dt>
		<dd lz:if="{{setName_editable}}" input="text">
			<lz:block lz:if="{{srvEventType$setName}}">
				{{srvEventType$setName}}
			</lz:block>
			<lz:block lz:if="{{!srvEventType$setName}}">
		 	<input type="text" class="input narrow"   name="srvEventType.setName" id="setName"  value="{{lz.htm(srvEventType.setName)}}"/>
	 	 </lz:block>
	 	 <b>*</b>
	 	 <em>请输入事件类型的类型名称</em> 
	 	 <a class="mui-navigate-right"></a>
		</dd>
		<dd lz:if="{{setName_readonly}}">
		 	<div class="state-input narrow">
		 		<textarea class=""  style="display:none;" id="setName">{{srvEventType.setName}}</textarea>
		 		<span>
		 	
			 {{lz.html(srvEventType.setName$||srvEventType.setName)}}
	 	 		</span>
	 	 	</div>
		</dd>
	</dl>
	{{after$setName}}
	{{lz.set("setLevel_editable",((edittype=='insert'||(edittype=='inport' && (!lz.idin(inports,"setLevel"))))&&true)||(edittype=='update'&&true)||((edittype=='any')&&(lz.idin(fields,"setLevel"))))}}
	{{lz.set("setLevel_readonly",(edittype=='insert'&&false)||(edittype=='update'&&false)||(edittype=='detail'))}}
	
	{{before$setLevel}}
	<dl lz:if="{{setLevel_editable||setLevel_readonly}}" class="setLevel  " major  ref="setLevel">
		<dt>事件级别:</dt>
		<dd lz:if="{{setLevel_editable}}" input="select">
			<lz:block lz:if="{{srvEventType$setLevel}}">
				{{srvEventType$setLevel}}
			</lz:block>
			<lz:block lz:if="{{!srvEventType$setLevel}}">
		 	<select class="narrow" id="setLevel" name="srvEventType.setLevel">
		 		<option value="">请选择</option>
				<option value="0" selected='{{srvEventType.setLevel=="0"?"selected":""}}'>自定提示</option>
				<option value="1" selected='{{srvEventType.setLevel=="1"?"selected":""}}'>强制提示</option>
				<option value="2" selected='{{srvEventType.setLevel=="2"?"selected":""}}'>全员提示</option>
		 	</select>
	 	 </lz:block>
	 	 <b>*</b>
	 	 <em>请选择事件类型的事件级别</em> 
	 	 <a class="mui-navigate-right"></a>
		</dd>
		<dd lz:if="{{setLevel_readonly}}">
		 	<div class="state-input narrow">
		 		<textarea class=""  style="display:none;" id="setLevel">{{srvEventType.setLevel}}</textarea>
		 		<span>
		 	
			 {{lz.html(srvEventType.setLevel$||srvEventType.setLevel)}}
	 	 		</span>
	 	 	</div>
		</dd>
	</dl>
	{{after$setLevel}}
	{{lz.set("setInterval_editable",((edittype=='insert'||(edittype=='inport' && (!lz.idin(inports,"setInterval"))))&&true)||(edittype=='update'&&true)||((edittype=='any')&&(lz.idin(fields,"setInterval"))))}}
	{{lz.set("setInterval_readonly",(edittype=='insert'&&false)||(edittype=='update'&&false)||(edittype=='detail'))}}
	
	{{before$setInterval}}
	<dl lz:if="{{setInterval_editable||setInterval_readonly}}" class="ribs setInterval  " major  ref="setInterval">
		<dt>时间间隔:</dt>
		<dd lz:if="{{setInterval_editable}}" input="select">
			<lz:block lz:if="{{srvEventType$setInterval}}">
				{{srvEventType$setInterval}}
			</lz:block>
			<lz:block lz:if="{{!srvEventType$setInterval}}">
		 	<select class="narrow" id="setInterval" name="srvEventType.setInterval">
		 		<option value="">请选择</option>
				<option value="0" selected='{{srvEventType.setInterval=="0"?"selected":""}}'>不限制</option>
				<option value="60" selected='{{srvEventType.setInterval=="60"?"selected":""}}'>一分钟</option>
				<option value="600" selected='{{srvEventType.setInterval=="600"?"selected":""}}'>十分钟</option>
				<option value="1800" selected='{{srvEventType.setInterval=="1800"?"selected":""}}'>半小时</option>
				<option value="3600" selected='{{srvEventType.setInterval=="3600"?"selected":""}}'>一小时</option>
				<option value="7200" selected='{{srvEventType.setInterval=="7200"?"selected":""}}'>两小时</option>
				<option value="43200" selected='{{srvEventType.setInterval=="43200"?"selected":""}}'>半天</option>
				<option value="86400" selected='{{srvEventType.setInterval=="86400"?"selected":""}}'>一天</option>
				<option value="2592000" selected='{{srvEventType.setInterval=="2592000"?"selected":""}}'>一个月</option>
		 	</select>
	 	 </lz:block>
	 	 
	 	 <em>请选择事件类型的时间间隔</em> 
	 	 <a class="mui-navigate-right"></a>
		</dd>
		<dd lz:if="{{setInterval_readonly}}">
		 	<div class="state-input narrow">
		 		<textarea class=""  style="display:none;" id="setInterval">{{srvEventType.setInterval}}</textarea>
		 		<span>
		 	
			 {{lz.html(srvEventType.setInterval$||srvEventType.setInterval)}}
	 	 		</span>
	 	 	</div>
		</dd>
	</dl>
	{{after$setInterval}}
	{{lz.set("setUpdateTime_editable",((edittype=='insert'||(edittype=='inport' && (!lz.idin(inports,"setUpdateTime"))))&&false)||(edittype=='update'&&false)||((edittype=='any')&&(lz.idin(fields,"setUpdateTime"))))}}
	{{lz.set("setUpdateTime_readonly",(edittype=='insert'&&false)||(edittype=='update'&&false)||(edittype=='detail'))}}
	
	{{before$setUpdateTime}}
	<dl lz:if="{{setUpdateTime_editable||setUpdateTime_readonly}}" class="setUpdateTime  " major  ref="setUpdateTime">
		<dt>修改时间:</dt>
		<dd lz:if="{{setUpdateTime_editable}}" input="datetime">
			<lz:block lz:if="{{srvEventType$setUpdateTime}}">
				{{srvEventType$setUpdateTime}}
			</lz:block>
			<lz:block lz:if="{{!srvEventType$setUpdateTime}}">
		 	<input onchange="void(0);" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" type="text" class="datetime input narrow" maxlength="19" name="srvEventType.setUpdateTime" id="setUpdateTime"  value="{{srvEventType.setUpdateTime$}}"/>
	 	 </lz:block>
	 	 <b>*</b>
	 	 <em>请选择事件类型的修改时间</em> 
	 	 <a class="mui-navigate-right"></a>
		</dd>
		<dd lz:if="{{setUpdateTime_readonly}}">
		 	<div class="state-input narrow">
		 		<textarea class=""  style="display:none;" id="setUpdateTime">{{srvEventType.setUpdateTime}}</textarea>
		 		<span>
		 	
			 {{lz.html(srvEventType.setUpdateTime$||srvEventType.setUpdateTime)}}
	 	 		</span>
	 	 	</div>
		</dd>
	</dl>
	{{after$setUpdateTime}}
	{{lz.set("setAddTime_editable",((edittype=='insert'||(edittype=='inport' && (!lz.idin(inports,"setAddTime"))))&&false)||(edittype=='update'&&false)||((edittype=='any')&&(lz.idin(fields,"setAddTime"))))}}
	{{lz.set("setAddTime_readonly",(edittype=='insert'&&false)||(edittype=='update'&&false)||(edittype=='detail'))}}
	
	{{before$setAddTime}}
	<dl lz:if="{{setAddTime_editable||setAddTime_readonly}}" class="setAddTime  " major  ref="setAddTime">
		<dt>添加时间:</dt>
		<dd lz:if="{{setAddTime_editable}}" input="datetime">
			<lz:block lz:if="{{srvEventType$setAddTime}}">
				{{srvEventType$setAddTime}}
			</lz:block>
			<lz:block lz:if="{{!srvEventType$setAddTime}}">
		 	<input onchange="void(0);" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" type="text" class="datetime input narrow" maxlength="19" name="srvEventType.setAddTime" id="setAddTime"  value="{{srvEventType.setAddTime$}}"/>
	 	 </lz:block>
	 	 <b>*</b>
	 	 <em>请选择事件类型的添加时间</em> 
	 	 <a class="mui-navigate-right"></a>
		</dd>
		<dd lz:if="{{setAddTime_readonly}}">
		 	<div class="state-input narrow">
		 		<textarea class=""  style="display:none;" id="setAddTime">{{srvEventType.setAddTime}}</textarea>
		 		<span>
		 	
			 {{lz.html(srvEventType.setAddTime$||srvEventType.setAddTime)}}
	 	 		</span>
	 	 	</div>
		</dd>
	</dl>
	{{after$setAddTime}}
	{{lz.set("setStatus_editable",((edittype=='insert'||(edittype=='inport' && (!lz.idin(inports,"setStatus"))))&&true)||(edittype=='update'&&true)||((edittype=='any')&&(lz.idin(fields,"setStatus"))))}}
	{{lz.set("setStatus_readonly",(edittype=='insert'&&false)||(edittype=='update'&&false)||(edittype=='detail'))}}
	
	{{before$setStatus}}
	<dl lz:if="{{setStatus_editable||setStatus_readonly}}" class="setStatus  " major  ref="setStatus">
		<dt>状　　态:</dt>
		<dd lz:if="{{setStatus_editable}}" input="select">
			<lz:block lz:if="{{srvEventType$setStatus}}">
				{{srvEventType$setStatus}}
			</lz:block>
			<lz:block lz:if="{{!srvEventType$setStatus}}">
		 	<select class="narrow" id="setStatus" name="srvEventType.setStatus">
		 		<option value="">请选择</option>
				<option value="1" selected='{{srvEventType.setStatus=="1"?"selected":""}}'>启用</option>
				<option value="0" selected='{{srvEventType.setStatus=="0"?"selected":""}}'>禁用</option>
		 	</select>
	 	 </lz:block>
	 	 <b>*</b>
	 	 <em>请选择事件类型的状态</em> 
	 	 <a class="mui-navigate-right"></a>
		</dd>
		<dd lz:if="{{setStatus_readonly}}">
		 	<div class="state-input narrow">
		 		<textarea class=""  style="display:none;" id="setStatus">{{srvEventType.setStatus}}</textarea>
		 		<span>
		 	
			 {{lz.html(srvEventType.setStatus$||srvEventType.setStatus)}}
	 	 		</span>
	 	 	</div>
		</dd>
	</dl>
	{{after$setStatus}}
			
			
			<div class="line">
				<center lz:if="{{edittype=='insert'}}">
					<a onclick="$('.ribs').show();window.fireResize();$('.ribs-handle').toggle();" href="javascript:void(0);" class="state-content ribs-handle" style="display:inline;padding: 0px 15px;">点击展开更多编辑项</a>
					<a onclick="$('.ribs').hide();window.fireResize();$('.ribs-handle').toggle();" href="javascript:void(0);" class="state-content ribs-handle" style="display:none;padding: 0px 15px;">点击收起更多编辑项</a>
				</center>
			</div>
			<center class="buttons">
				<input type="hidden" value="{{srvEventType.setId}}" name="srvEventType.setId" id="setId" />
			
			<lz:block lz:if="{{edittype=='insert'||edittype=='update'||edittype=='any'||edittype=='inport'}}">
				<button class="button" type="submit">
					&nbsp;<img class="iconA" align="absmiddle" width="20" src="/admin/images/icons/Badge-tick.png"/>
					<span class="iconB iconfont icon-weibiaoti8"></span>
					保存&nbsp;&nbsp;</button>
				<button title="不保存数据,关闭窗口,不刷新原列表" class="button" onclick="cancel();" type="button">
					&nbsp;<img class="iconA" align="absmiddle" width="20" src="/admin/images/icons/Badge-multiply.png"/>
					<span class="iconB iconfont icon-icon11"></span>
					关闭&nbsp;&nbsp;</button>
			</lz:block>
			
			<lz:block lz:if="{{edittype=='detail'}}">
				<button lz:if="{{canEdit}}" type="button" class="button" onclick='window.location.href="/admin/systematic/eventtype.edit.html?edittype=update&id={{srvEventType.id}}"'>
					&nbsp;<img class="iconA" align="absmiddle" width="20" src="/admin/images/icons/Badge-tick.png"/>
					<span class="iconB iconfont icon-weibiaoti8"></span>
					修改&nbsp;&nbsp;</button>
				<button lz:if="{{canDel}}" type="button" class="button" onclick="deleteEventtype('{{srvEventType.id}}','{{srvEventType.setName}}')">
					&nbsp;<img class="iconA" align="absmiddle" width="20" src="/admin/images/icons/Badge-multiply.png"/>
					<span class="iconB iconfont icon-icon11"></span>
					删除&nbsp;&nbsp;</button>
				<button title="不保存数据,关闭窗口,不刷新原列表" class="button" onclick="cancel();" type="button">
					&nbsp;<img class="iconA" align="absmiddle" width="20" src="/admin/images/icons/Badge-multiply.png"/>
					<span class="iconB iconfont icon-icon11"></span>
					关闭&nbsp;&nbsp;</button>
			</lz:block>
					
			</center>
			<br/>

		</div>
	</div>
	<div class="foot"></div>		
</form>

 


<!------------------------VIEW_HTML_BOTTOM------------------------>
<!------------------------VIEW_HTML_BOTTOM------------------------>


</body>

<!------------------------VIEW_HTML_FOOTER------------------------>
<!------------------------VIEW_HTML_FOOTER------------------------>
<script>
	
	$(function(){
		if(parent.setit){
			parent.setit("/admin/systematic/eventtype.edit.html",document.title,"/admin//images/icons/20088256421631277803.png");
		}
	});
	
	function cancel(){
		if(parent.closeHref){
			parent.closeHref("/admin/systematic/eventtype.edit.html");
		}else{
			$.closeModalDialog();
		}
	}


	/**
	* 删除事件类型
	**/
	function deleteEventtype(id,flag)
	{
		var dialog=top.$.dialog({
				html:"<span style='white-space:nowrap;'>确定要删除当前数据吗？</span>",
				title:"删除事件类型",
				modal: true,			
				onOk:function(){
					dialog.closeDialog();
					var url = "/admin/systematic/eventtype.delete.do";
					var params = {id:id};
					var protocol = $.getAjax(url,params);
					if(protocol.message){
						top.$.toast(protocol.message);
					}
					if(protocol.success){
						caller.location.href=caller.location.href;		
					}
				}
		 });	
	}
</script>
</html>